<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function f() {
        console.log("Hello!");
      }

      function fn() {
        console.log("Hello jack!");
      }

      Function.prototype.defer = function (ms) {
        setTimeout(() => {
          // f();
          this();
        }, ms);
      };
      f.defer(3000); // 1 秒后显示 "Hello!"
      fn.defer(2000);
    </script>
  </body>
</html>
